<?php
namespace Admin\Model;

class UserModel extends \Think\Model {

	/**
	 * 获取所有注册用户
	 * @return array 获取所有用户列表
	 */
	public function get_user() {

		$page = $_POST['page'];
        $rows = $_POST['rows'];
        $limit = "limit ".($page-1)*$rows.','.$rows;

		$where = '';
		$res = $this->where($where)->limit($limit)->select();
		foreach ($res as $k => $v) {
			$res[$k]['password'] = 'default';
			$res[$k]['rtime'] = date('Y-m-d',strtotime($v['rtime']));
		}
		return $res;
	}


	/**
	 * 验证用户数据合法性
	 * @param  array $user 用户属性数组
	 * @return boolean 验证结果
	 */
	public function verify($user) {

	}

}